//
//  UUIntentOrderActionRequestModel.m
//  UUCharterSupplier
//
//  Created by ZhangAo on 01/03/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import "UUIntentOrderActionRequestModel.h"

@interface UUIntentOrderActionRequestModel ()

@property (nonatomic, copy) NSString *type;

@end

@implementation UUIntentOrderActionRequestModel

- (instancetype)init {
    self = [super init];
    if (self) {
        [self addIgnoredObjects:@[@"actionType"]];
    }
    return self;
}

- (NSString *)url {
    switch (self.actionType) {
        case UUIntentOrderActionTypeBid:
            self.type = @"bid";
            break;
        case UUIntentOrderActionTypeIgnore:
            [self addIgnoredObjects:@[@"price"]];
            self.type = @"ignore";
            break;
        case UUIntentOrderActionTypeIgnoreAll:
            [self addIgnoredObjects:@[@"intentOrderId", @"price"]];
            self.type = @"ignore_all";
            break;
    }
    
    return @"intentOrder";
}

- (DKHTTPMethod)HTTPMethod {
    return DKHTTPMethodPost;
}

- (Class)responseModelClass {
    return [UUResponseModel class];
}

@end
